<template>
	<view>
		<view style="height: 168rpx;">
			<tui-tabbar :current="mytabber"  backdropFilter backgroundColor="#f8f8f8" :tabBar="tabBar" color="#777" selectedColor="#AC9157" @click="tabbarSwitch"></tui-tabbar>
		</view>
	</view>
</template>

<script>
	import tuiTabbar from "@/components/thorui/tui-tabbar/tui-tabbar.vue"
	export default {
		name:"fivetabbar",
		components:{
			tuiTabbar
		},
		props: {
			mytabber: {
				type: Number,
				default: 0,
			}
		},
		data() {
			return {
				current: 0,
				tabBar: [
					{
						pagePath: '/pages/index/index',
						text: '首页',
						iconPath: '../../../static/首页@1x.png',
						selectedIconPath: '../../../static/首页 2@1x.png'
					},
					{
						pagePath: '/pages/message/message',
						text: '咨询',
						iconPath: '/static/订单_订单列表@2x.png',
						selectedIconPath: '/static/订单_订单列表@1x.png'
					},
					{
						pagePath: '/pages/Attorney side/answerRob/answerRob',
						text: '抢答',
						iconPath: '../../../static/答 (2).png',
						selectedIconPath: '../../../static/答 (2).png',
						hump: true,
					},
					{
						pagePath: '/pages/lawyer/lawyer',
						text: '找律师',
						iconPath: '/static/画板 2白.png',
						selectedIconPath: '/static/画板 2.png',
					},
					{
						pagePath: '/pages/Attorney side/attorney/attorney',
						text: '我的',
						iconPath: '/static/我的.png',
						selectedIconPath: '/static/画板 3@1x (1).png',
					}
				],
			};
		},
		methods: {
			// 底部tabber事件
			tabbarSwitch(e) {
				//获取登录状态，此处默认未登录
				//跳转切换逻辑需自行实现
				// let isLogin = false;
				// if (e.verify && !isLogin) {
				// 	// this.tui.toast('您还未登录，请先登录');
				// } else {
					uni.redirectTo({
						url: e.pagePath
					});
					this.current = e.index; // 更新当前选中的TabBar索引
				// }
			},
		}
	}
</script>

<style scoped lang="scss">

</style>